<!DOCTYPE html>
<%@page contentType="text/html;charset=utf-8" language="java"%>
<html lang="en">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function refreshCode(){
        var vcode=document.getElementById("vcode");
        vcode.src="/CheckServlet?time="+new Date().getTime();
    }

</script>
<div align="center">
<form action="/LoginServlet" method="post" class="form-horizontal" style="width: 600px;" id="myForm">
    <table class="table table-hover table-bordered" >
        <tr style="height: 70px">
            <td align="center" bgcolor="#87ceeb" colspan="2" style="color: brown;font-size: 30px;"> Java Web学习论坛留言版——前台登录</td>
        </tr>
        <tr>
            <td><label  class="col-sm-6 control-label">账号</label></td>
            <%--  value="${sessionScope.name }"  这样处理界面保存session数据才能输出,session注销后就不再显示     --%>
            <%--  value="${cookie.name.value}"  这是利用cookie进行数据保存，点击退出按钮也不影响显示--%>
            <td><input type="text" name="name" id="11" value="${cookie.name.value}" class="form-control" placeholder="账号"></td></tr>
        <tr><td><label  class="col-sm-6 control-label">密码</label></td>
            <td><input type="password" name="password" id="22" value="${cookie.password.value}" class="form-control" placeholder="密码"></td></tr>
        <tr><td><label  class="col-sm-6 control-label">验证码</label></td>
            <td><a href="javascript:refreshCode()"><img src="/CheckServlet" id="vcode" title="点击刷新"></a></td></tr>
        <tr><td><label  class="col-sm-7 control-label">输入验证码</label></td>
            <td><input type="text" name="check_code" id="33" class="form-control" placeholder="验证码"></td></tr>
            <td colspan="2" align="center">
                <input type="hidden" name="flag" value="0">
                <input type="submit" name="submit" id="44" value="确定" class="btn btn-default">
                <input type="reset" name="reset" id="55" value="重置" class="btn btn-default">
               &nbsp;&nbsp;&nbsp;&nbsp; <input type="checkbox"  name="check" style="" checked>记住密码
                </td></tr>
    </table>
    <br>
    <a href="register.jsp">还没注册？请点击注册!</a>
</form>
</div>
</body>
</html>